home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Commodore Disk User Volume 4 #11
/
Commodore_Disk_User_Vol.4_11_1991_-.d64
/
budget calc
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
12KB
|
385 lines
100 rem *******************************
110 rem * budget calc by s.phillips *
120 rem *******************************
130 poke808,239:rem disables run/stop
140 iflo=1thengosub2920:gosub2640:goto590
150 poke53280,9:poke53281,9:poke646,7:printchr$(142):gosub160:gosub180:goto190
160 print"[147] b u d g e t p r o g r a m m e":pe=1
170 print"[197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197]":return
180 print"written by: simon phillips":return
190 print"please key in present month"
200 print"month: [164] [164] [164]"
210 qt=16:qu$="":an$="":ft=0:op=0:pe$="actual"
220 getqu$:ifqu$=""then220
230 print"[145]"tab(qt)qu$
240 an$=an$+qu$:qt=qt+2:ft=ft+1:ifft=3then260
250 goto220
260 ifan$="jan"thenop=1
270 ifan$="feb"thenop=2
280 ifan$="mar"thenop=3
290 ifan$="apr"thenop=4
300 ifan$="may"thenop=5
310 ifan$="jun"thenop=6
320 ifan$="jul"thenop=7
330 ifan$="aug"thenop=8
340 ifan$="sep"thenop=9
350 ifan$="oct"thenop=10
360 ifan$="nov"thenop=11
370 ifan$="dec"thenop=12
380 ifop=0orop=13thenan$="":qt=16:ft=0:print"[145][145][145]":goto200
390 print"press space bar [146] to commence loading":mz$=an$
400 geta$:ifa$=" "then420
410 goto400
420 print"[147]loading budget data"
430 open2,8,2,"0:budget data,s,r":input#2,sr:input#2,cm:am=0
440 dimh(200),h$(200),y(200),y$(200),hm(20),hm$(20),ym(20),ym$(20),hs(25)
450 dimhs$(25),ys(25),ys$(25),v(200)
460 dimm$(20),m(20),s$(20),s(20),f$(200),f(200),fz(200),fz$(200),sr$(20),ss$(20)
470 dimsu$(20),sr(20),ss(20),su(20),ba$(30),bb$(30),bc$(30),ba(30),bb(30),j$(30)
480 dimbc(30),st$(20),mt$(20),mt(20),st(20),nb(20),nc(20),gt(10),r(99):fora=1to192
490 input#2,y$(a):y$=mid$(y$(a),2):y(a)=val(y$):nexta
500 fora=1to192:input#2,h$(a):h$=mid$(h$(a),2):h(a)=val(h$):nexta:gosub2920:gosub2640
510 forb=1to12:input#2,sr$(b):sr$=mid$(sr$(b),2):sr(b)=val(sr$)
520 input#2,ss$(b):ss$=mid$(ss$(b),2):ss(b)=val(ss$)
530 input#2,su$(b):su$=mid$(su$(b),2):su(b)=val(su$)
540 nextb:forc=1to16
550 input#2,ba$(c):ba$=mid$(ba$(c),2):ba(c)=val(ba$)
560 input#2,bb$(c):bb$=mid$(bb$(c),2):bb(c)=val(bb$)
570 input#2,bc$(c):bc$=mid$(bc$(c),2):bc(c)=val(bc$)
580 nextc:input#2,gt(1):input#2,gt(2):input#2,gt(3):close2
590 sm$="sub [205] month":st$="subt":mt$="monthly tot":mi=12
600 open3,8,3,"0:budget subjects,s,r"
610 forfi=1to16
620 input#3,j$(fi):s$(fi)=mid$(j$(fi),1,mi):input#3,nb(fi):input#3,nc(fi)
630 nextfi
640 close3
650 gosub660:goto720
660 forgh=1to192
670 ify$(gh)="000"theny$(gh)="---"
680 f$(gh)=y$(gh):f(gh)=y(gh)
690 nextgh
700 forgh=1to16:st$(gh)=ys$(gh):st(gh)=ys(gh):nextgh
710 forgh=1to12:mt$(gh)=ym$(gh):mt(gh)=ym(gh):nextgh:return
720 open4,8,4,"0:budget months,s,r"
730 forzz=1to12:input#4,m$(zz):nextzz:close4
740 ifan$=mid$(m$(1),2,3)andlo=0thencm=cm+1:sr=1:goto3200
750 la$="":lb$=" ":lc$=" ":ld$=" ":le$=" "
760 lf$="[163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]":lk$="":pe$=" actual "
770 gosub830:gosub780:goto820
780 print"";
790 forty=1to19:print" ":nextty
800 return
810 gosub830
820 goto860
830 pa$(1)="[207][183][183][183][183][183][183][208][207][183][183][183][183][208][146][207][183][183][183][183][183][208][207][183][183][183][208][207][183][183][183][183][183][183][183][183][208]"
840 pa$(2)="[180]review[167][165]move[167][146][165]amend[167][165]end[167][165]"+pe$+"[167]"
850 pa$(3)="[204][175][175][175][175][175][175][186][204][175][175][175][175][186][146][204][175][175][175][175][175][186][204][175][175][175][186][204][175][175][175][175][175][175][175][175][186]":return
860 gosub880
870 goto940
880 print"[147]"
890 print""
900 print"[207][183][183][183][183][183][183][208][207][183][183][183][183][208][146][207][183][183][183][183][183][208][207][183][183][183][208][207][183][183][183][183][183][183][183][183][208]"
910 print"[180]review[167][165]move[167][146][165]amend[167][165]end[167][165]"+pe$+"[167]"
920 print"[204][175][175][175][175][175][175][186][204][175][175][175][175][186][146][204][175][175][175][175][175][186][204][175][175][175][186][204][175][175][175][175][175][175][175][175][186]"
930 return
940 print""
950 gosub780
960 di=2:s=1:f=1:u=1:m=1:mt=1:ff=f:ss=s:uu=u:mm=m:mu=mt:goto1260
970 f=ff:s=ss:u=uu:m=mm:mt=mu
980 sw=1:di=2
990 az$="":ax$=""
1000 di=2:print"";az$;lb$;m$(m);la$;m$(m+1);la$;m$(m+2);la$;m$(m+3);lc$;ax$
1010 print"";lf$
1020 print"";az$;lb$;f$(f);lb$;f$(f+1);lb$;f$(f+2);lb$;f$(f+3);lc$;ax$
1030 print"";az$;lb$;f$(f+12);lb$;f$(f+13);lb$;f$(f+14);lb$;f$(f+15);lc$;
1040 printax$
1050 print"";az$;lb$;f$(f+24);lb$;f$(f+25);lb$;f$(f+26);lb$;f$(f+27);lc$;
1060 printax$
1070 print"";az$;lb$;f$(f+36);lb$;f$(f+37);lb$;f$(f+38);lb$;f$(f+39);lc$;
1080 printax$
1090 print"";az$;la$;mt$(mt);la$;mt$(mt+1);la$;mt$(mt+2);la$;mt$(mt+3);ld$;
1100 printgt$
1110 goto1390
1120 sw=1:di=2
1130 ac$="":av$="":ab$=" ":as$="[157][157][157][157][157][157][157][157][157][157][157][157]"
1140 di=2:print""
1150 print"";lf$
1160 print"";ab$;as$;s$(s);lb$;f$(f);lb$;f$(f+1);lb$;f$(f+2);lb$;f$(f+3);lc$;st$(u)
1170 print"";ab$;as$;s$(s+1);lb$;f$(f+12);lb$;f$(f+13);lb$;f$(f+14);lb$;f$(f+15);
1180 printlc$;st$(u+1)
1190 print"";ab$;as$;s$(s+2);lb$;f$(f+24);lb$;f$(f+25);lb$;f$(f+26);lb$;f$(f+27);
1200 printlc$;st$(u+2)
1210 print"";ab$;as$;s$(s+3);lb$;f$(f+36);lb$;f$(f+37);lb$;f$(f+38);lb$;f$(f+39);
1220 printlc$;st$(u+3)
1230 print"";az$;la$;ac$;la$;ac$;la$;ac$;la$;ac$;ld$;
1240 printgt$
1250 goto1390
1260 f=ff:s=ss:u=uu:m=mm:mt=mu
1270 sw=1:di=2:gosub780
1280 di=2:print"";sm$;lb$;m$(m);la$;m$(m+1);la$;m$(m+2);la$;m$(m+3);lc$;st$
1290 print"";lf$
1300 print"";s$(s);lb$;f$(f);lb$;f$(f+1);lb$;f$(f+2);lb$;f$(f+3);lc$;st$(u)
1310 print"";s$(s+1);lb$;f$(f+12);lb$;f$(f+13);lb$;f$(f+14);lb$;f$(f+15);lc$;
1320 printst$(u+1)
1330 print"";s$(s+2);lb$;f$(f+24);lb$;f$(f+25);lb$;f$(f+26);lb$;f$(f+27);lc$;
1340 printst$(u+2)
1350 print"";s$(s+3);lb$;f$(f+36);lb$;f$(f+37);lb$;f$(f+38);lb$;f$(f+39);lc$;
1360 printst$(u+3)
1370 print"";mt$;la$;mt$(mt);la$;mt$(mt+1);la$;mt$(mt+2);la$;mt$(mt+3);ld$;
1380 printgt$
1390 sd=notpeek(56320)and15:fo=peek(56320)and16
1400 if(sdand1)then1460
1410 if(sdand2)then1500
1420 if(sdand4)then1540
1430 if(sdand8)then1590
1440 iffo=0then2100
1450 sd=0:goto1390
1460 iff=1orf=2orf=3orf=4orf=6orf=7orf=8then1390
1470 iff=5then1390
1480 iff=9then1390
1490 f=f-12:s=s-1:u=u-1:goto1120
1500 iff=145orf=146orf=147orf=148orf=150orf=151orf=152then1390
1510 iff=149then1390
1520 iff=153then1390
1530 f=f+12:s=s+1:u=u+1:goto1120
1540 iff=1orf=13orf=25orf=37orf=61orf=73orf=85orf=109orf=121orf=133then1390
1550 iff=49then1390
1560 iff=97then1390
1570 iff=145then1390
1580 f=f-1:m=m-1:mt=mt-1:goto980
1590 iff=9orf=21orf=33orf=45orf=69orf=81orf=93orf=117orf=129orf=141then1390
1600 iff=57then1390
1610 iff=105then1390
1620 iff=153then1390
1630 f=f+1:m=m+1:mt=mt+1:goto980
1640 ce$="":nu=0:cf=0:cg=0:f=ff:print""f$(f)"[146]":x=0:y=0
1650 ff=f:ss=s:uu=u:mm=m:mu=mt
1660 sd=notpeek(56320)and15:fo=peek(56320)and16:y1=y:x1=x
1670 if(sdand2)theny=y+1:goto1710
1680 if(sdand1)theny=y-1:goto1710
1690 if(sdand4)thenx=x-1:goto1710
1700 if(sdand8)thenx=x+1:goto1710
1710 ify<0theny=0
1720 ify>3theny=3
1730 ifx<0thenx=0
1740 ifx>3thenx=3
1750 iffo=0thengosub890:goto1260
1760 ifx<>x1thengosub1990
1770 ify<>y1thengosub1990
1780 print"";:nu=0:forja=1to(y*3)+4:print"";:nextja
1790 printtab(13+(x*5));
1800 ify>0thennu=12*y
1810 nu=nu+x
1820 print"";f$(f+nu)
1830 geta$
1840 fo=peek(56320)and16:iffo=0then1750
1850 ifa$=""then1890
1860 ifa$=chr$(13)then1910
1870 a=asc(a$):ifa>57ora<48then1830
1880 goto1910
1890 ifcf=0then1980
1900 goto1830
1910 cg=cg+1:ifcg=4thencp$=ce$:ce$=""+ce$:goto2010
1920 ce$=ce$+a$
1930 print"";
1940 print"";:forja=1to(y*3)+4:print"";:nextja
1950 printtab(14+(x*5));"";ce$
1960 cf=1:goto1830
1970 iffo=0then2100
1980 sd=0:goto1660
1990 print"";:forja=1to(y1*3)+4:print"";:nextja
2000 printtab(13+(x1*5));"[146]";f$(f+nu):return
2010 ifa$=chr$(13)thencf=0:f$(f+nu)=ce$:f(f+nu)=val(cp$):am=1:goto2030
2020 goto2090
2030 print"please wait"
2040 ifpe=1theny$(f+nu)=ce$:y(f+nu)=val(cp$)
2050 ifpe=0thenh$(f+nu)=ce$:h(f+nu)=val(cp$)
2060 ifpe=1thengosub2640:gosub660:goto2080
2070 ifpe=0thengosub2920:gosub3590:goto2080
2080 gosub830:gosub880:goto1260
2090 cg=0:ce$="":goto1930
2100 ff=f:ss=s:uu=u:mm=m:mu=mt
2110 fo=peek(56320)and16:iffo=0then2110
2120 f=16:sd=notpeek(56320)and15:fo=peek(56320)and16
2130 if(sdand1)then2110
2140 if(sdand2)then2110
2150 if(sdand4)thendi=di-1:goto2190
2160 if(sdand8)thendi=di+1:goto2190
2170 iffo=0then2530
2180 sd=0:goto2120
2190 ifdi=0thendi=5:goto2210
2200 ifdi=6thendi=1
2210 ondigoto2230,2290,2350,2410,2470
2220 goto2120
2230 print""
2240 print"[207][183][183][183][183][183][183][208][146][207][183][183][183][183][208][207][183][183][183][183][183][208][207][183][183][183][208][207][183][183][183][183][183][183][183][183][208]"
2250 print"[180]review[167][146][165]move[167][165]amend[167][165]end[167][165]";pe$;"[167]"
2260 print"[204][175][175][175][175][175][175][186][146][204][175][175][175][175][186][204][175][175][175][175][175][186][204][175][175][175][186][204][175][175][175][175][175][175][175][175][186]"
2270 fordz=1to100:nextdz
2280 goto2120
2290 print""
2300 print"[207][183][183][183][183][183][183][208][207][183][183][183][183][208][146][207][183][183][183][183][183][208][207][183][183][183][208][207][183][183][183][183][183][183][183][183][208]"
2310 print"[180]review[167][165]move[167][146][165]amend[167][165]end[167][165]";pe$;"[170]"
2320 print"[204][175][175][175][175][175][175][186][204][175][175][175][175][186][146][204][175][175][175][175][175][186][204][175][175][175][186][204][175][175][175][175][175][175][175][175][186]"
2330 fordz=1to100:nextdz
2340 goto2120
2350 print""
2360 print"[207][183][183][183][183][183][183][208][207][183][183][183][183][208][207][183][183][183][183][183][208][146][207][183][183][183][208][207][183][183][183][183][183][183][183][183][208]"
2370 print"[180]review[167][165]move[167][165]amend[167][146][165]end[167][165]";pe$;"[170]"
2380 print"[204][175][175][175][175][175][175][186][204][175][175][175][175][186][204][175][175][175][175][175][186][146][204][175][175][175][186][204][175][175][175][175][175][175][175][175][186]"
2390 fordz=1to100:nextdz
2400 goto2120
2410 print""
2420 print"[207][183][183][183][183][183][183][208][207][183][183][183][183][208][207][183][183][183][183][183][208][207][183][183][183][208][146][207][183][183][183][183][183][183][183][183][208]"
2430 print"[180]review[167][165]move[167][165]amend[167][165]end[167][146][165]";pe$;"[170]"
2440 print"[204][175][175][175][175][175][175][186][204][175][175][175][175][186][204][175][175][175][175][175][186][204][175][175][175][186][146][204][175][175][175][175][175][175][175][175][186]"
2450 fordz=1to100:nextdz
2460 goto2120
2470 print""
2480 print"[207][183][183][183][183][183][183][208][207][183][183][183][183][208][207][183][183][183][183][183][208][207][183][183][183][208][207][183][183][183][183][183][183][183][183][208][146]"
2490 print"[180]review[167][165]move[167][165]amend[167][165]end[167][165]";pe$;"[170][146]"
2500 print"[204][175][175][175][175][175][175][186][204][175][175][175][175][186][204][175][175][175][175][175][186][204][175][175][175][186][204][175][175][175][175][175][175][175][175][186][146]"
2510 fordz=1to100:nextdz
2520 goto2120
2530 print""
2540 ondigoto3480,2600,1640,3470,3500
2550 end
2560 gosub2640:di=2:goto2350
2570 print"[180]review[167][165]move[167][146][165]amend[167][165]end[167][165]";pe$;"[167]"
2580 print"[204][175][175][175][175][175][175][186][204][175][175][175][175][186][146][204][175][175][175][175][175][186][204][175][175][175][186][204][175][175][175][175][175][175][175][175][186]"
2590 goto2630
2600 print"[147]":print""
2610 print"[207][183][183][183][183][183][183][208][207][183][183][183][183][208][146][207][183][183][183][183][183][208][207][183][183][183][208][207][183][183][183][183][183][183][183][183][208]"
2620 goto2570
2630 goto1260
2640 forer=1to(12*16):ify$(er)="000"theny$(er)="---":nexter
2650 forty=1to12
2660 ym(ty)=y(ty)+y(ty+12)+y(ty+24)+y(ty+48)+y(ty+60)+y(ty+72)+y(ty+84)+y(ty+96)
2670 ym(ty)=ym(ty)+y(ty+108)+y(ty+120)+y(ty+132)+y(ty+144)+y(ty+156)+y(ty+168)
2680 ym(ty)=ym(ty)+y(ty+36)+y(ty+180):ym$(ty)=str$(ym(ty))
2690 nextty:zy=0
2700 forzx=0to15:zz=(zx*12)+1:zy=zy+1
2710 ys(zy)=y(zz)+y(zz+1)+y(zz+2)+y(zz+3)+y(zz+4)+y(zz+5)+y(zz+6)+y(zz+7)
2720 ys(zy)=ys(zy)+y(zz+8)+y(zz+9)+y(zz+10)+y(zz+11)
2730 nextzx
2740 forty=1to16:ys$(ty)=str$(ys(ty)):nextty
2750 gt=ym(1)+ym(2)+ym(3)+ym(4)+ym(5)+ym(6)+ym(7)+ym(8)+ym(9)+ym(10)+ym(11)
2760 gt=gt+ym(12):gt$=str$(gt):gt$=mid$(gt$,2):gt$=""+gt$
2770 fort=1to16:ym$(t)=mid$(ym$(t),2)
2780 ifym$(t)="0"thenym$(t)="0000":goto2830
2790 l=len(ym$(t)):ifl=3thenym$(t)="0"+ym$(t):goto2830
2800 l=len(ym$(t)):ifl=2thenym$(t)="00"+ym$(t):goto2830
2810 l=len(ym$(t)):ifl=1thenym$(t)="000"+ym$(t):goto2830
2820 l=len(ym$(t)):ifl=4thenym$(t)=""+ym$(t):goto2830
2830 nextt
2840 fort=1to16:ys$(t)=mid$(ys$(t),2)
2850 ifys$(t)="0"thenys$(t)="0000":goto2900
2860 l=len(ys$(t)):ifl=3thenys$(t)="0"+ys$(t):goto2900
2870 l=len(ys$(t)):ifl=2thenys$(t)="00"+ys$(t):goto2900
2880 l=len(ys$(t)):ifl=1thenys$(t)="000"+ys$(t):goto2900
2890 l=len(ys$(t)):ifl=4thenys$(t)=""+ys$(t)
2900 nextt
2910 return
2920 forer=1to(12*16):ifh$(er)="000"thenh$(er)="---":nexter
2930 forty=1to12
2940 hm(ty)=h(ty)+h(ty+12)+h(ty+24)+h(ty+48)+h(ty+60)+h(ty+72)+h(ty+84)+h(ty+96)
2950 hm(ty)=hm(ty)+h(ty+108)+h(ty+120)+h(ty+132)+h(ty+144)+h(ty+156)+h(ty+168)
2960 hm(ty)=hm(ty)+h(ty+36)+h(ty+180):hm$(ty)=str$(hm(ty))
2970 nextty:zy=0
2980 forzx=0to15:zz=(zx*12)+1:zy=zy+1
2990 hs(zy)=h(zz)+h(zz+1)+h(zz+2)+h(zz+3)+h(zz+4)+h(zz+5)+h(zz+6)+h(zz+7)
3000 hs(zy)=hs(zy)+h(zz+8)+h(zz+9)+h(zz+10)+h(zz+11)
3010 nextzx
3020 forty=1to16:hs$(ty)=str$(hs(ty)):nextty
3030 gt=hm(1)+hm(2)+hm(3)+hm(4)+hm(5)+hm(6)+hm(7)+hm(8)+hm(9)+hm(10)+hm(11)
3040 gt=gt+hm(12):gt$=str$(gt):gt$=mid$(gt$,2):gt$=""+gt$:gh$=gt$
3050 fort=1to16:hm$(t)=mid$(hm$(t),2)
3060 ifhm$(t)="0"thenhm$(t)="0000":goto3110
3070 l=len(hm$(t)):ifl=3thenhm$(t)="0"+hm$(t):goto3110
3080 l=len(hm$(t)):ifl=2thenhm$(t)="00"+hm$(t):goto3110
3090 l=len(hm$(t)):ifl=1thenhm$(t)="000"+hm$(t):goto3110
3100 l=len(hm$(t)):ifl=4thenhm$(t)=""+hm$(t):goto3110
3110 nextt
3120 fort=1to16:hs$(t)=mid$(hs$(t),2)
3130 ifhs$(t)="0"thenhs$(t)="0000":goto3180
3140 l=len(hs$(t)):ifl=3thenhs$(t)="0"+hs$(t):goto3180
3150 l=len(hs$(t)):ifl=2thenhs$(t)="00"+hs$(t):goto3180
3160 l=len(hs$(t)):ifl=1thenhs$(t)="000"+hs$(t):goto3180
3170 l=len(hs$(t)):ifl=4thenhs$(t)=""+hs$(t)
3180 nextt
3190 return
3200 forw=1to193:y(w)=0:h(w)=0:h$(w)="---":y$(w)="---":nextw
3210 forgh=1to192
3220 h(gh)=0:ifh(gh)>0thenh(gh)=0
3230 y(gh)=0:ify(gh)>0theny(gh)=0:nextgh
3240 fore=1to16
3250 ifst(e)>0thenst(e)=0
3260 st$(e)="0000":nexte
3270 gt(1)=gt(2):gt$(1)=gt$(2)
3280 gt(2)=gt(3):gt$(2)=gt$(3)
3290 gt(3)=gt:gt$(3)=gt$
3300 forgh=1to12
3310 ym$(gh)="0000":ifym$(gh)<>"0000"thenym$(gh)="0000"
3320 hm$(gh)="0000":ifhm$(gh)<>"0000"thenhm$(gh)="0000"
3330 nextgh
3340 gt=0:gt$="0000"
3350 forp=1to16
3360 ys$(p)="0000"
3370 hs$(p)="0000"
3380 ys(p)=0000
3390 hs(p)=0000
3400 nextp:sr=0
3410 forp=1to12:hm(p)=0000:hm$(p)="0000":ym(p)=0:ym$(p)="0000":nextp
3420 f=zq(1):s=zq(2):t=zq(3):m=zq(4):mt=zq(5)
3430 fortu=1to193:f$(tu)=y$(tu):f(tu)=y(tu):nexttu
3440 fortu=1to16:st$(tu)=ys$(tu):st(tu)=ys(tu):nexttu
3450 fortu=1to12:mt$(tu)=ym$(tu):mt(tu)=ym(tu):nexttu
3460 goto750
3470 print"please wait":gosub3650:load"bud end",8,1
3480 print"please wait":gosub3650
3490 load"bud review",8,1
3500 print"please wait"
3510 ifpe=0thenpe=1:pe$=" actual ":gosub2640:goto3560
3520 ifpe=1thenpe=0:pe$="estimate":gosub2920
3530 fortu=1to193:f$(tu)=h$(tu):f(tu)=h(tu):nexttu
3540 fortu=1to16:st$(tu)=hs$(tu):st(tu)=hs(tu):nexttu
3550 fortu=1to12:mt$(tu)=hm$(tu):mt(tu)=hm(tu):nexttu:goto2600
3560 fortu=1to193:f$(tu)=y$(tu):f(tu)=y(tu):nexttu
3570 fortu=1to16:st$(tu)=ys$(tu):st(tu)=ys(tu):nexttu
3580 fortu=1to12:mt$(tu)=ym$(tu):mt(tu)=ym(tu):nexttu:goto2600
3590 forgh=1to192
3600 ifh$(gh)="000"thenh$(gh)="---"
3610 f$(gh)=h$(gh):f(gh)=h(gh)
3620 nextgh
3630 forgh=1to12:st$(gh)=hs$(gh):st(gh)=hs(gh):nextgh
3640 forgh=1to16:mt$(gh)=hm$(gh):mt(gh)=hm(gh):nextgh:return
3650 gt=ym(1)+ym(2)+ym(3)+ym(4)+ym(5)+ym(6)+ym(7)+ym(8)+ym(9)+ym(10)+ym(11)
3660 gt=gt+ym(12):gt$=str$(gt):gt$=mid$(gt$,2):gt$=""+gt$
3670 open2,8,2,"@0:budget data 2,s,w"
3680 forty=1to192
3690 print#2,y$(ty)
3700 print#2,y(ty)
3710 nextty
3720 forty=1to192
3730 print#2,h$(ty)
3740 print#2,h(ty)
3750 nextty
3760 print#2,gt$
3770 forty=1to12
3780 print#2,ym$(ty)
3790 print#2,ym(ty)
3800 nextty
3810 forty=1to12
3820 print#2,hm$(ty)
3830 print#2,hm(ty)
3840 nextty
3850 forty=1to16
3860 print#2,ys$(ty)
3870 print#2,ys(ty)
3880 nextty
3890 forty=1to16
3900 print#2,hs$(ty)
3910 print#2,hs(ty)
3920 nextty:close2
3930 return